<script>
/**
 * Widget Component
 */
export default {
  data() {
    return {
      statData: [
        {
          title: "计算资源实例",
          icon: "ri-stack-line",
          value: "53台",
          subvalue: "12台",
          text: "真机数量",
        },
        {
          title: "生产环境内存",
          icon: "ri-store-2-line",
          value: "1TB",
          subvalue: "200GB",
          text: "已使用",
        },
        {
          title: "生产环境磁盘",
          icon: "ri-briefcase-4-line",
          value: "40TB",
          subvalue: "8TB",
          text: "已使用",
        },
        {
          title: "JEE服务器",
          icon: "ri-archive-drawer-line",
          value: "100台",
          subvalue: "1台",
          text: "MySQL",
        },
      ],
    };
  },
};
</script>

<template>
  <div class="row">
    <div class="col-md-3" v-for="(data, index) in statData" :key="index">
      <div class="card">
        <div class="card-body">
          <div class="media">
            <div class="media-body overflow-hidden">
              <p class="text-truncate font-size-14 mb-2">{{ data.title }}</p>
              <h4 class="mb-0">{{ data.value }}</h4>
            </div>
            <div class="text-primary">
              <i :class="`${data.icon} font-size-24`"></i>
            </div>
          </div>
        </div>

        <div class="card-body border-top py-3">
          <div class="text-truncate">
            <span class="badge badge-soft-success font-size-11">
              <!-- <i class="mdi mdi-menu-up"></i> -->
              {{ data.subvalue }}
            </span>
            <span class="text-muted ml-2">{{ data.text }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>

  <!-- end row -->
</template>